package com.zyy.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.zyy.seckill.entity.User;
import com.zyy.seckill.vo.LoginVo;
import com.zyy.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zyy
 * @since 2021-10-03
 */
public interface IUserService extends IService<User> {

    /**
     *  登录校验接口
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean doLongin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     *  根据cookie的value取出redis中存储的对象的值
     * @param userTicket
     * @return
     */
    User getUserByCookie(String userTicket,HttpServletRequest request, HttpServletResponse response);

    /**
     *      用户密码更新
     * @param userTicket  从cookie中获取的redis中存储的对象的键
     * @param password
     * @param request
     * @param response
     * @return
     */
    RespBean updatePassWord(String userTicket,String password,HttpServletRequest request, HttpServletResponse response);
}
